This invention relates to printer drivers and, in particular, to a printer driver that caches polygons and bitmap images to generate a reduced size printer description file.
Personal computers are widely used to print complex documents containing text, graphics and images. The Internet also provides users easy access to thousands of images and compound documents.
Various sophisticated word processing and desktop publishing applications are available to users that can generate complex graphics made up of polygon objects and bitmap images. Polygon objects have three or more sides with regular or irregular shapes. Complex objects, for example, a human face can be divided into a plurality of polygon objects for rendering purposes.
Preparing such complex documents on a computer for printing requires several image-processing operations performed either by the application or by printer driver software normally included with the printer or downloaded from the Internet. As a consequence of incorporating images and complex graphics into a document, today""s computer systems are taxed due to processing large amounts of data. Furthermore, large memory storage is needed to store processed documents before they are sent to a printer. Several approaches to document preparation and printing exist.
One such technique is called xe2x80x9cspoolingxe2x80x9d that allows returning the CPU to the user as quickly as possible from a print job. The printer image is spooled as a xe2x80x9cspool filexe2x80x9d on the computer""s hard disk and sent to the printer as a background process only when the CPU is freed from its primary task. This allows the printer driver to return control of the computer back to the user without having to wait for the actual output to be produced.
Windows operating systems (Windows 95 and 98, Microsoft Corp.) use a method known as enhanced metafile format (EMF) spooling. In EMF spooling, the operating system (OS) spools up all of the calls that an application makes to the printer driver and saves the calls in a spool file along with a copy of the data that represents the image. The spooled file is written to a disk. Then the spooled file with the image data is read from the disk and handed to the printer driver.
The printer driver takes the spooled file and creates a high level Printer Description Language File (xe2x80x9cPDL filexe2x80x9d) and stores the PDL file on the disk. The PDL file is sent to the printer engine, processed and printed. If the PDL file is too large, it affects CPU performance and consumes a large amount of disk space.
EMF spooling has not solved all the drawbacks in the present printing systems because a large amount of data is still passed through the system. For example, roughly 20 megabytes of data are needed to represent a typical 24 bit, 8xe2x80x3 by 10xe2x80x3 image at 300 dpi, and 80 megabytes of data are needed at 600 dpi. Depending upon the complexity of the images, the PDL file can become very large when a user generates polygon objects or bitmaps. This slows down the printing system by taxing the CPU and also uses a lot of memory space.
Hence, what is needed is a method and system that minimizes the amount of data handled by the printer driver, reduces the memory storage space requirements, and eases the demand on the CPU.
The present invention addresses the foregoing by providing a method that reduces the size of the PDL file and hence reduces memory storage requirement and improves CPU performance during the printing process.
In one embodiment, the present invention concerns a method performed in a printing process by a printer driver for use in a computer system, including process steps to receive a first polygon object, with a corresponding clipping rectangle and corresponding attribute data, and to store attribute data of the first polygon object. Thereafter, the process receives other polygon objects, with corresponding clipping rectangles and attribute data, and compares attribute data of the polygon objects after the first polygon object with the attribute data of the first polygon object. Finally, the process stores the clipping rectangles corresponding to the first polygon object and the polygon objects after the first polygon with same attribute data as the first polygon object, as a linked list.
In another embodiment, the present invention concerns a method performed in a printing process by a printer driver for use in a computer system, including process steps to receive a first bitmap image with a corresponding clipping rectangle and corresponding attribute data, and to store the attribute data of the first bitmap image. Thereafter, the process receives other bitmap images after the first bitmap image, with corresponding clipping rectangles and attribute data, and compares attribute data of bitmap images after the first bitmap image to the attribute data of the first bitmap image. Finally, the process stores the clipping rectangles corresponding to the first bitmap image and the bitmap images with the same attribute data as the first bitmap image, as a linked list.
By virtue of the foregoing aspects of the present invention, PDL file size as processed by the printer driver for a document containing polygon objects and/or bitmap images is reduced. Hence, memory space to store the PDL file is reduced, and CPU performance during the printing process is improved.